<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ page import = "java.util.*" %>
    <%@ page import = "beans.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Pedidos</title>
	<script language="JavaScript" type="text/javascript">
		function nuevoPedido(winObj){
			alert("Nuevo Pedido \n \n Se creara un nuevo pedido");
		}
	</script>
</head>
<body>
	<h2>Nuevo Pedido</h2>
	<%
	    MozoBean mozo = (MozoBean) session.getAttribute("mozo");
	    String nombApell = mozo.getNombre()+" "+mozo.getApellido();
	%>
	<h6>Mozo:<%=nombApell%>
	</h6>
	<br><hr><br>
	<form name = "NuevoPedido"
		action = "./MozoSarvlet"
		method = "get"">
		<b>Mesa:</b>
		<%
	    MesaBean aux1;
	     Integer id; 	
	    ArrayList<MesaBean> mesas = (ArrayList<MesaBean>) session.getAttribute("mesas");%>
	    <select name="mesa">
	    <% for(Iterator<MesaBean> i = mesas.iterator(); i.hasNext();)
	      {
			aux1 = i.next();%>
			<option><%=aux1.getIdMesa()%></option>
		<% } %>
	    </select>
	    <input type="hidden" name="action" value="altaPedido">
		<input type="submit" name="Submit" value="Crear Pedido">
	</form>
</body>
</html>